package top.healthylife.service;

import top.healthylife.domain.Permission;
import top.healthylife.domain.Role;
import top.healthylife.domain.User;
import top.healthylife.entity.PageResult;
import top.healthylife.entity.QueryPageBean;

import java.util.List;
import java.util.Set;

public interface RoleService {
    PageResult findPage(QueryPageBean queryPageBean);

    List<Role> findAll();

    /**
     *  根据用户 查询对应角色,以及角色包含的信息
     */

    Set<Role> findRolesByUser(User user);

    void updateById(Permission permission);

    void deleteById(Integer id);

    void add(Role role, Integer[] permissionIds);

    /**
     * 根据id查询角色信息
     * @param id
     * @return
     */
    Role findById(Integer id);
}
